<%@page contentType="text/html" pageEncoding="UTF-8"%>  
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>  
<jsp:include page="header.jsp"/>   

<jsp:include page="navMenu.jsp"/> 


<h1>Bienvenue</h1>

<h2>Les albums publics</h2>

    <!-- Liste des albums -->
    <table class="table table-striped table-hover">
        <tr>
            <th>Nom d'album</th>
            <th>Nom de l'utilisateur</th>
            <th>Actions</th>
        </tr>
        <c:forEach var="album" items="${requestScope['albumList']}" >
            <tr class="info">
                <td style="font-weight: bold;">${album.getName()}</td>
                <td style="font-weight: bold;">${album.getUtilisateur().getIdentifiant()}</td>
                <td>
                    <a href="${pageContext.request.contextPath}/Album?action=ouvrirAlbum&album=${album.id}"><button class="btn btn-primary">Ouvrir</button></a>
                </td>
            </tr>
        </c:forEach> 
    </table>

    <br>

<jsp:include page="footer.jsp"/>   